
import React, { Fragment } from 'react';
import { Link, useRoutes } from "react-router-dom";
import routes from "./Routers/index";
import './App.css'

function App() {
  const routesList = useRoutes(routes) // 路由列表
  return (
    <Fragment>
      <div className='router-linkItems'>
        <h3>这里是路由</h3>
        <Link className='list-item' to='/todolist'> 跳转到TodoList </Link>
        <Link className='list-item' to='/weather'> 跳转到Weather </Link>
        <Link className='list-item' to='/login'> 跳转到login </Link>
      </div>
        {routesList}
    </Fragment>
  );
}

export default App;
